
FIND_PATH(GOOGLE_TEST_INCLUDE_DIR gtest/gtest.h "$ENV{GTEST_INC_DIR}" )

# Look for the library.
IF( $ENV{GTEST_LIB_FILE_DEBUG} )
	SET ( GOOGLE_TEST_LIBRARY_DEBUG "$ENV{GTEST_LIB_FILE_DEBUG}" )
ELSE( $ENV{GTEST_LIB_FILE_DEBUG} )
	FIND_LIBRARY(GOOGLE_TEST_LIBRARY_DEBUG NAMES gtestd "$ENV{GTEST_LIB_DIR}" )
ENDIF( $ENV{GTEST_LIB_FILE_DEBUG} )


IF( $ENV{GTEST_LIB_FILE_RELEASE} )
	SET ( GOOGLE_TEST_LIBRARY_RELEASE "$ENV{GTEST_LIB_FILE_RELEASE}" )
ELSE( $ENV{GTEST_LIB_FILE_RELEASE} )
	FIND_LIBRARY(GOOGLE_TEST_LIBRARY_RELEASE NAMES gtest "$ENV{GTEST_LIB_DIR}" )
ENDIF( $ENV{GTEST_LIB_FILE_RELEASE} )

CADKIT_SET_DEBUG_RELEASE_LIBRARY( GOOGLE_TEST_LIBRARY GOOGLE_TEST_LIBRARY_DEBUG GOOGLE_TEST_LIBRARY_RELEASE )

IF( GOOGLE_TEST_LIBRARY AND GOOGLE_TEST_INCLUDE_DIR )
	SET ( GOOGLE_TEST_FOUND TRUE )
ENDIF( GOOGLE_TEST_LIBRARY AND GOOGLE_TEST_INCLUDE_DIR )
